<script lang="ts" setup>

interface Props {
    show?: boolean;
    type?: string;
    message?: string;
    duration?: number;
    position?: string;
    color?: string;
    background?: string;
    className?: string;
    lockScroll?: boolean;
    onClick?: (event: MouseEvent) => void;
    onOpened?: () => void;
    onClose?: () => void;
}

const props = withDefaults(defineProps<Props>(), {
    show: true,
    type: "danger",
    message: "",
    duration: 3000,
    position: "top",
    color: "white",
    background: "",
    className: "",
    lockScroll: false,
    onClick: (event: MouseEvent) => {
        console.log(event);
    },
    onOpened: () => { },
    onClose: () => { },
});

</script>
<template>
    <van-notify :show="show" :type="type" :message="message" :duration="duration" :position="position" :color="color"
        :background="background" :className="className" :lockScroll="lockScroll" :onClick="onClick" :onOpened="onOpened"
        :onClose="onClose" />
</template>
<style lang="scss" scoped></style>